iT邦幫忙

2018 iT 邦幫忙鐵人賽
DAY 22
0
Data Technology

Microsoft R Solution系列 第 22

Day22 - MSSQL Reporting Service嵌入R 繪圖 Part1 SSRS安裝

  • 分享至 

  • xImage
  •  

SSRS的全名是SQL Server Reporting Service, 是Microsoft出的報表工具, 這篇主要是來介紹如何在SSRS引用R繪製的圖形, 先來看看為什麼會有這樣的需求? 主要是因為R能夠繪製各式各樣的圖形, 而讓SSRS內建的圖形望塵莫及啊, 舉例來說底下出現的圖形, SSRS是無法繪製的
https://ithelp.ithome.com.tw/upload/images/20180109/201033339b6Q4WQvEw.png
http://www.jenunderwood.com/2014/11/18/r-visualizations-in-ssrs/

但是透過R可以輕鬆繪製以上的圖形, 所以大神Timo Klimmer開發了R Graphics Device for Reporting Services(https://rgraphicsdevice.codeplex.com/), 可以在報表開發工具或是Visual Studio輸入R Code產生圖形然後嵌進SSRS之中如下
https://ithelp.ithome.com.tw/upload/images/20180109/20103333ReSO07Vm9b.png
https://ithelp.ithome.com.tw/upload/images/20180109/20103333Oy1XAG05bQ.png

R Graphics Device for Reporting Services的使用方式僅適用於MSSQL 2012或MSSQL 2014的SSRS, 不過由於筆者安裝MSSQL 2017, 所以R Graphics Device for Reporting Services就不實作了, 有興趣的朋友可以參考上述連結, 這篇主要來實作MSSQL 2017的SSRS如何嵌進R所產生的圖形.

接著就來安裝SSRS, 啟動MSSQL的安裝程式, 然後點擊SSRS安裝, 此時會導向Microsoft網站去下載SSRS的安裝程式
https://ithelp.ithome.com.tw/upload/images/20180109/20103333yijTLIt0Eh.png

執行安裝SSRS安裝程式如下, 點選Install Reporting Services
https://ithelp.ithome.com.tw/upload/images/20180109/20103333st3zWZyVMi.png

選擇評估版, 按下Next
https://ithelp.ithome.com.tw/upload/images/20180109/20103333jppVvm4NRT.png

一路下一步到底
https://ithelp.ithome.com.tw/upload/images/20180109/20103333awNl1chjB2.png

最後點擊Configure report server如下
https://ithelp.ithome.com.tw/upload/images/20180109/20103333Pp6UQykzQd.png

按下Connect
https://ithelp.ithome.com.tw/upload/images/20180109/201033332IpwxTl5Pe.png

點選Web Service URL, 直接按下Apply
https://ithelp.ithome.com.tw/upload/images/20180109/20103333BKJqd2nNNt.png

接著點選Database來設定SSRS的組態資料庫, 按下Change Database
https://ithelp.ithome.com.tw/upload/images/20180109/20103333mVT0dM73o2.png

選擇新增一個資料庫, 按下Next
https://ithelp.ithome.com.tw/upload/images/20180109/20103333gSdxEUfByD.png

設定資料庫連線帳號如下, 然後按下Next
https://ithelp.ithome.com.tw/upload/images/20180109/20103333RuS80QgxJT.png

資料庫名稱採預設, 按下Next
https://ithelp.ithome.com.tw/upload/images/20180109/20103333Mq6HK5iJsA.png

認證類型, 一樣採預設, 按下Next
https://ithelp.ithome.com.tw/upload/images/20180109/20103333rOVFHoj6b6.png

接著一樣Next到底
https://ithelp.ithome.com.tw/upload/images/20180109/20103333vEKFu1Zb3T.png

最後按下Finish完成資料庫設定
https://ithelp.ithome.com.tw/upload/images/20180109/201033331GkXamiqMr.png

接下來點選Web Portal URL, 按下Apply
https://ithelp.ithome.com.tw/upload/images/20180109/20103333Ac0opjn7ek.png

之後點選建好URL如下
https://ithelp.ithome.com.tw/upload/images/20180109/20103333Q1mibQBTud.png

就可以進到SSRS的報表平台
https://ithelp.ithome.com.tw/upload/images/20180109/20103333qt4lV6pzaC.png

到此, SSRS安裝完成, 下一篇就來開發SSRS報表囉!

本文參考
https://rgraphicsdevice.codeplex.com
http://www.jenunderwood.com/2014/11/18/r-visualizations-in-ssrs/
https://www.teamscs.com/2016/05/r-reporting-services/

後記: MSSQL 2017的SSRS看起來頗炫, 看起來要來更新公司用MSSQL 2008R2的SSRS了


上一篇
Day21 - Microsoft R Client與MSSQL R Service 互動 Part2
下一篇
Day23 - MSSQL Reporting Service嵌入R 繪圖 Part2 SSRS報表開發
系列文
Microsoft R Solution30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

1 則留言

0
rocky30rocky
iT邦新手 5 級 ‧ 2023-01-18 17:12:38

我是用VM開啟SQL Sever 2014跟SSRS 2014
但是我的SSRS沒有辦法Connect
而且Report Server Instance沒有選項可以選
請問您知道這是什麼問題嗎?
https://ithelp.ithome.com.tw/upload/images/20230118/20136445WBsfzkS3yx.png

arksu iT邦新手 2 級 ‧ 2023-02-06 17:07:52 檢舉

抱歉了, 這個我沒遇到, 我都順順的裝完

我要留言

立即登入留言